import java.util.Scanner;

/**
 * 12. 字符统计
 * https://www.lanqiao.cn/problems/2142/learning/?page=1&first_category_id=1&tags=2022,%E7%9C%81%E8%B5%9B&tag_relation=intersection&sort=pass_rate&asc=0
 */
public class Main12 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        int[] arr = new int[26];
        String str = scan.next();
        for(int i = 0;i < str.length();i++) {
            arr[str.charAt(i) - 'A']++;
        }

        int max = 0;
        for(int i = 0;i < 26;i++) {
            if(arr[i] > max) {
                max = arr[i];
            }
        }

        for(int i = 0;i < 26;i++) {
            if(arr[i] == max) {
                System.out.print((char)(i + 'A'));
            }
        }
        scan.close();
    }
}
